package com.app.biz.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.app.biz.domain.BizAppChatMsg;
import com.app.biz.domain.IndustryCluster;
import com.app.biz.service.IIndustryClusterService;
import com.app.common.core.controller.BaseController;
import com.app.common.core.domain.AjaxResult;
import com.app.common.core.page.TableDataInfo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author ZhouS
 * @CreateDate 2022-09-23
 * @Description:
 */
@RestController
@RequestMapping("industryCluster")
public class IndustryClusterController extends BaseController {

    protected final Logger logger = LoggerFactory.getLogger(IndustryClusterController.class);

    @Autowired
    private IIndustryClusterService iIndustryClusterService;



    @GetMapping("findListPage")
    public TableDataInfo findListPage(IndustryCluster industryCluster){
        startPage();
        List<IndustryCluster> list=iIndustryClusterService.findListPage(industryCluster);
        return getDataTable(list);
    }

    @GetMapping("getList")
    public AjaxResult getList(){
        try {
            List<IndustryCluster> list=iIndustryClusterService.getAll();
            return AjaxResult.success(list);
        }catch (Exception e){
            logger.error("查询异常：===》" + e);
            return AjaxResult.error(e.getMessage());
        }
    }



}